home *** CD-ROM | disk | FTP | other *** search
/ Night Owl 6 / Night Owl's Shareware - PDSI-006 - Night Owl Corp (1990).iso / 034a / dfqbx10.zip / EXINPUT.BAS < prev    next >
BASIC Source File  |  1991-10-21  |  685b  |  26 lines

  1. 'Program to demonstrate using IN.PUT as an INKEY$ function
  2. 'Command line to load in the environment: QBX EXINPUT /L DFRAMEX
  3.  
  4. ' $INCLUDE: '\INC\DFRAMEX.INC'
  5.  
  6. PROGNAME$ = "Input Example"
  7. VERSION$ = " v1.0"
  8. EXENAME$ = "EXINPUT"
  9. INITIALIZE
  10. CLOSE #1
  11.  
  12. ' We'll assume there is some code above this, so now we want an answer.
  13. DIS.PLAY "Your answer? > ", LGREEN, BLACK, 0, 0, 10, 3, 0, 0, 0
  14.  
  15. ' Get a 5 character maximum response, blue on white, and allow 60 seconds
  16. ' to answer.
  17. IN.PUT 5, 60, LBLUE, WHITE
  18.  
  19. ' Now we'll DIS.PLAY the answer. This will be "-1" if a timeout occurred.
  20. DIS.PLAY RESPONSE$, LRED, BLACK, 0, 0, 15, 10, 1, 0, 0
  21. ENTER
  22. CLRSCRN
  23. EXIT.DOOR "Y"
  24. END
  25.  
  26.